package com.gxyk.adapter;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.demo.view.MovieLayout;
import com.example.jiemian.R;
import com.example.jiemian2.XiaHSV_activity;
import com.gxyk.adapter.ShopEntity_adapter.ViewHolder;
import com.gxyk.bean.ShopEntity;
import com.lidroid.xutils.BitmapUtils;

public class Image_adapter extends BaseAdapter{

    private Context  context;
	private final String[] mItems;
	public Image_adapter(Context  context,String[] objects) {
		this.context=context ;
		mItems = objects;
	}
	
	public int getCount() {
		return mItems.length;
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder;
		if(convertView==null){
			convertView=View.inflate(context, R.layout.image_item, null);
			holder=new ViewHolder();
			holder.imagesc_text=(TextView) convertView.findViewById(R.id.imagesc_text);			
			convertView.setTag(holder);
		}else{
			holder=(ViewHolder) convertView.getTag();
		}	
		holder.imagesc_text.setText(mItems[position]);	
		
		return convertView;
	}
	@Override
	public Object getItem(int position) {
		return mItems[position];
	}

	@Override
	public long getItemId(int position) {
		return position;
	}
	public  class ViewHolder{
		public   TextView  imagesc_text;	
	}
}
